# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sngrep
pkgver=1.4.7
pkgrel=0
pkgdesc="A tool for displaying SIP call message flows from a terminal"
url="https://github.com/irontec/sngrep"
arch="all !ppc64le"
license="GPL-3.0-or-later"
depends="sed"
makedepends="autoconf automake ncurses-dev libpcap-dev
	pcre-dev libgcrypt-dev openssl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/irontec/sngrep/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	./bootstrap.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-openssl \
		--with-pcre \
		--disable-logo \
		--enable-ipv6
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir/" install
}

sha512sums="f414f9cc49b0c34cbbf5a77d285f12eb4091af3395953ed93dbe2f57d4ba3731d16c4b56c37e90744cf3784572975f485aed48cdd100898ffaee18e9a18943b1  sngrep-1.4.7.tar.gz"
